package com.hzbank.juc.deadlock;

import lombok.extern.slf4j.Slf4j;

/**
 * @description:
 * @author: libugu@cskaoyan.com
 * @date 2023/12/25 - 11:22
 */
@Slf4j
public class TestEat03 {
    public static void main(String[] args) {
        Chopstick02 c1 = new Chopstick02("1");
        Chopstick02 c2 = new Chopstick02("2");
        Chopstick02 c3 = new Chopstick02("3");
        Chopstick02 c4 = new Chopstick02("4");
        Chopstick02 c5 = new Chopstick02("5");

        new Philosopher02("苏格拉底", c1, c2).start();
        new Philosopher02("柏拉图", c2, c3).start();
        new Philosopher02("亚里士多德", c3, c4).start();
        new Philosopher02("赫拉克利特", c4, c5).start();
        new Philosopher02("阿基米德", c5, c1).start();
    }

}
